﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Hsinchu.Model;
using Hsinchu.BLL;

public partial class Admin_SystemSet_UserGroupManager : System.Web.UI.Page
{
    Hsinchu.BLL.AdminGroup dllAdminGroup = new AdminGroup();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            initLoad();
        }
    }

    /// <summary>
    /// 初始化载入
    /// </summary>
    protected void initLoad()
    {
        this.gdvUserGroup.DataSource = dllAdminGroup.GetUserGroup();
        this.gdvUserGroup.DataBind();
    }


    /// <summary>
    /// 添加用户组
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnAddUserGroup_Click(object sender, EventArgs e)
    {
        MAdminGroup AdminGroup = new MAdminGroup();
        AdminGroup.GroupName = this.txtUserGroup.Text;
        if (dllAdminGroup.AddUserGroup(AdminGroup) > 0)
        {
            //弹出提示
        }
    }
}
